1. Field
The disclosed and claimed concept relates generally to electronic devices and, more particularly, to a method for controlling a camera module incorporated into a portable electronic device to compensate for the characteristics of a white LED used as a flash for taking pictures.
2. Description of the Related Art
It is widely known to use a variety of different sources of light for taking a picture with a digital camera module, including natural sunlight, a xenon strobe, an incandescent bulb or a fluorescent bulb. Despite being very different light sources using very different processes to emit light, a common characteristic of all of these light sources is that the spectrums of light emitted by each of them, despite being different, provide a range of light frequencies that resemble the expected behavior of radiant emissions of a blackbody at given temperatures.
In 1931, an international committee called the Commission Internationale de L'Eclairage (CIE) met in Cambridge, England, and attempted to put forward a graphical depiction of the full range of colors of light that the human eye can actually perceive. This graphical depiction, namely a chromaticity chart, and the resulting standard incorporating this chromaticity chart has come to be known as “CIE 1931” and is widely used by scientists and photographers, among many others, in working with light in the visible light spectrum. FIG. 1 depicts a simplified representation of a chromaticity chart 100 based on the CIE 1931 standard, with all visible colors of light specifiable with two dimensional color coordinates. As can be seen, towards the center of what is frequently called the “horseshoe-shaped” visible region 110 of all that the human eye can perceive is a white region 120 of colors of light generally categorized as “white light” and surrounded by other regions generally described as non-white light, including a red region 121, a pink region 122 and a purple region 123. It should be noted that the exact boundaries of these regions 120-123 should be taken as approximations and not precise designations of color, since the classification of colors is necessarily subjective.
The human brain has evolved its own form of white-balancing capability by which human beings have little trouble discerning what color an object should be, even though it may be illuminated with light that is only marginally white, such as the reddish hue of the sun at sunset, the orange glow of campfire, or the bluish tint of a mercury vapor streetlight. It is due to this flexibility of the human brain that a number of light sources emitting a variety of different spectra of light, and thereby having a variety of differing color coordinates that occupy different points on a chromaticity chart, can be classified as “white” light sources with the result that the white region 120 in FIG. 1 occupies a considerable proportion of the visible region 110.
Passing through the white region 120 is a portion of a blackbody curve 130 depicting the set of color coordinates of white light sources that emit a spectrum of light frequencies that substantially follow the spectrum of light frequencies that would be expected to be emitted from theoretically ideal blackbody light sources heated to different temperatures. Most commonly used sources of white light have color coordinates specifying a point that falls along or substantially close to this blackbody curve 130, including sunlight and xenon flash strobes, as well as incandescent, fluorescent, high-pressure sodium and mercury vapor lamps. As a result of so many of the commonly used sources of light used in taking pictures having color coordinates representing points that fall on or relatively close to the blackbody curve 130, algorithms, constants and limit values employed in digital cameras to perform automatic exposure control and automatic white-balancing are commonly chosen and designed with a presumption that all light sources that will be encountered will be ones with such color coordinates. Indeed, this presumption has become so ingrained that it has become commonplace for manufacturers of camera modules incorporated into other electronic devices to have such choices of algorithms, constants and limit values built into or preprogrammed directly into the camera modules, themselves.
As those skilled in the art of white-balancing algorithms will recognize, a step taken by many known white-balancing algorithms is attempting to derive a reference white color in a given image as an input parameter for determining the degree to which the colors in that image are to be adjusted to compensate for the lighting in the original scene so that the objects in the resulting picture are presented with their correct colors. To do this, white-balancing algorithms typically require either that there be an object in the image that actually is white (known as the “white world” algorithm) or that the average of all the colors of all the pixels in the image be a gray (known as the “gray world” algorithm), and either of these approaches can provide a basis from which a reference white color for that image may be derived. However, it is possible to have images that do not provide a white object or that are filled with objects of colors that provide a very skewed result when averaging to derive a gray. An example of such an image is one filled with the tree leaves of a forest of trees such that the image is filled with different shades of green and little else, thereby providing no white objects and providing an average that will necessarily be a green color and not a gray. If white-balancing algorithms are allowed to process such an image without constraints, the result can be whited-out or blackened-out objects in the resulting picture, and so it is deemed desirable to specify boundaries for what a reference white color may be so as to constrain the degree to which a white-balancing algorithm is permitted to adjust colors.
Given the aforementioned presumption that the light sources to be encountered by a digital camera are likely to have color coordinates specifying points falling along or quite close to the blackbody curve 130, the format in which the boundaries for what a reference white color may be are communicated to typical camera modules in a manner that comports with this assumption. In this commonly used format, a pair of color coordinates that define the endpoints of a straight segment in a chromaticity chart, such as a segment 140 depicted in FIG. 1, are communicated to a camera module along with an error term (or “locus”) specified in terms of a maximum perpendicular distance away from the segment 140. These two endpoints and the error term, together, specify a rectangular-shaped reference white region 141 within the white region 110 that defines these boundaries, thereby defining a set of acceptable color coordinates within which the white-balancing algorithm is permitted to choose a color to be a reference white for a given image. This is to allow a short segment that should resemble a small portion of the blackbody curve 130 to be specified, such as segment 140, and this short segment should be positioned to either largely overlie a portion of the blackbody curve 130 or to be relatively close to and relatively parallel with a portion of the blackbody curve 130. No allowance is made in this format for specifying the boundaries of a possible reference white with a reference white region having any other shape than a rectangular region, such as the reference white region 141 shown.
Also, given the same aforementioned presumption that the light sources to be encountered by a digital camera are likely to have color coordinates specifying points falling along or quite close to the blackbody curve 130, it is commonplace to in some way build minimum and/or maximum limits on values used to define the reference white region 141 such that values defining a reference white region 141 that does not substantially overlie the blackbody curve 130, or that is not at least substantially close to the blackbody curve 130 are rejected. The effective result is to create a limit region, such as limit region 145 depicted in FIG. 1, into which at least a portion of the white region 141 must fall.
Of those light sources having color coordinates representing points falling along or close to the blackbody curve 130, xenon strobes have become commonplace for use as flashes in portable electronic devices used in photography. A xenon strobe is very small in size while producing an extremely bright light that very quickly illuminates a setting of which a picture is to be taken. The amount of illumination needed from a flash to sufficiently light a scene for scanning its image is a measurable quantity and can be roughly calculated as the brightness of the flash multiplied by the amount of time it must be turned on. The brighter the light source used as a flash, the less time it needs to be turned on to sufficiently light a scene. Furthermore, the amount of time that a given flash needs to be turned on is not necessarily related to the amount of time needed for an image scanning element (such as a CCD semiconductor device or a CMOS imaging device) to actually scan an image as part of the process of capturing that image. In other words, where a bright flash is used, it is not unheard of to actually turn off the flash before the image scanning element has completed scanning the image, because a sufficient amount of illumination has been supplied and leaving the flash on any longer would result in too high an amount of illumination and portions of the image being whited out. However, where a dimmer light source is used as a flash, the flash must be turned on for a longer period of time to achieve the same amount of illumination as a brighter light source, and it is often necessary to delay the start of scanning an image until a high enough amount of illumination has been achieved.
Recently, a new artificial source of white light, the so-called white LED, has been introduced, providing the opportunity to create a flash for use in digital photography that requires less power than other light sources. Unfortunately, the white LEDs have a range of color coordinates specifying a range of points that fall substantially distant from the blackbody curve 130, and furthermore, at least partly fall outside the white region 120 and into the pink region 122. This deviation of white LEDs from the blackbody curve 130 is largely due to the manner in which white LEDs produce light. White LEDs are in truth, blue LEDs that are partially covered with a yellowish phosphor that converts part of the blue light into yellow light. The result is a blending of blue and yellow light frequencies that approximates white light well enough for the human eye and the human brain to accept it as a source of white light. In essence, two different non-white light emissions, each having its own spectrum of light frequencies, are being blended to approximate white light and such a mixing of two non-white spectra is not characteristic of blackbody sources of radiant energy.
Also, white LEDs, though brighter than incandescent lamps of comparable size, are far dimmer than xenon strobes of comparable size. As a result, to achieve a desirable amount of illumination of a scene when used as a flash, a white LED must be kept on far longer than a xenon strobe used as a flash, and a white LED must also be supplied with a very high amount of electric power that would actually damage internal components of the white LED if that amount of power were maintained for more than a very brief period of time. In using a white LED as a flash, the amount of time during which the white LED is actually turned on can be kept short enough to prevent this damage. Unfortunately, even during the brief period in which the white LED is turned on, the light emitting semiconductor components of the white LED respond to the very high amount of power by converting an ever increasing proportion of that power into heat as time passes from the moment at which that power is first supplied to the moment when that power is removed. Correspondingly, as time passes the proportion of that power converted to visible light decreases such that the white LED is initially very bright when that power is first applied, but that brightness level almost immediately begins fading more and more as time passes. With this quickly fading brightness, the color spectrum output by a white LED also changes quickly as time passes from the moment that it is turned on. This changing light level and this changing color spectrum must be taken into account in both calculating the amount of time a white LED is to be turned on to provide a sufficient total amount of illumination to serve as an effective flash and in compensating for its changing spectrum of light output in performing white-balancing.
Another feature of white LEDs not exhibited by artificial light sources long used in photography, including xenon strobes and incandescent bulbs, is the high variability in the color spectra of each of the blue and yellow elements of the light emitted by white LEDs. White LEDs and the technology to manufacture them are still sufficiently new that only slow progress has been made in exerting tighter control over the manufacture of white LEDs to achieve sufficient consistency to avoid having two white LEDs from the very same production run emit light that is of perceptibly different hues. For this reason, unlike other artificial light sources that have far higher consistency in the spectra of their emitted light, the size of the region that the “white” light emitted by LEDs may fall within is considerably larger than for other light sources. As a result of these various issues, current practices in controlling a camera module's built-in white-balancing algorithm are insufficient to accommodate the very unique characteristics of white LEDs.